﻿using System;

/**
 * In nominae patri et filii et spiritus sancti. Commit.
 * 
 * Fero, fers, tuli, latum, ferre.
 */

namespace OCXS.OCXSServiceLibrary.Configuration {

    /// <summary>
    /// Class used to expand internal types in configuration context.
    /// </summary>
    /// <remarks>
    /// The class defines a set of methods used to expand the functionalities of existing types. <br />
    /// For internal usage only.
    /// </remarks>
    public partial class VariableType : ICloneable {
        
        /// <summary>
        /// Provides string representation.
        /// </summary>
        /// <returns>String representation for the object.</returns>
        public override string ToString() {
            return "VariableType = {VariablePath = \"" + this.VariablePath + "\"" + 
                   "; VariableName = \"" + this.VariableName + "\"" +
                   "; VariableDescription = \"" + this.VariableDescription + "\"" +
                   "; VariableT = \"" + this.VariableT.ToString() + "\"" +
                   "; VariableMU = \"" + this.VariableMU + "\"" + 
                   "; VariableGenerator = " + this.VariableGenerator.ToString() +
                   "; VariableValue = " + ((this.VariableValue != null) ? this.VariableValue.ToString() : "None") + "}";
        }

        /// <summary>
        /// Provides cloning functionalities (shallow copy).
        /// </summary>
        /// <returns>A shallow copy of the object.</returns>
        public object Clone() {

            VariableType v = new VariableType();
            v.variableDescriptionField = this.variableDescriptionField;
            v.variableGeneratorField = this.variableGeneratorField;
            v.variableMUField = this.variableMUField;
            v.variableNameField = this.variableNameField;
            v.variablePathField = this.variablePathField;
            v.variableTField = this.variableTField;
            v.variableValueField = this.variableValueField;

            return v;
        }

    }

    /// <summary>
    /// Class used to expand internal types in configuration context.
    /// </summary>
    /// <remarks>
    /// The class defines a set of methods used to expand the functionalities of existing types. <br />
    /// For internal usage only.
    /// </remarks>
    public partial class VariableGeneratorType {

        /// <summary>
        /// Provides string representation.
        /// </summary>
        /// <returns>String representation for the object.</returns>
        public override string ToString() {
            return "VariableGeneratorType = " +
                   "{GeneratingFunction = \"" + this.GeneratingFunction.ToString() + "\"" +
                   "; GeneratingFunctionSpecified = \"" + this.GeneratingFunctionSpecified.ToString() + "\"" + 
                   "; StaticValues = [" + ((this.StaticValues != null) ? this.StaticValues.ToString() + ":" + this.StaticValues.Length : "None") + "]" +
                   "; PeriodUpdate = \"" + this.PeriodUpdate.ToString() + "\"}";
        }

    }
}
